<?php
/**
 * Created by PhpStorm.
 * User: zephyr
 * Date: 4/29/14
 * Time: 10:11 PM
 *
 * 邮件表单内容
 */

    // create short variable names
    $name = $_POST['name'];
    $email = $_POST['email'];
    $feedback = $_POST['feedback'];

    // set up some static information
    $toaddress = "feedback@example.com";

    $subject = "Feedback from web site";

    $mailcontent = "Customer name:".$name."\n".
                   "Customer email:".$email."\n".
                   "Customer comments:\n".$feedback."\n";

    $fromaddress = "From: webserver@example.com";

    // invoke mail() function to send mail
    mail($toaddress, $subject, $mailcontent, $fromaddress);

?>
<html>
<head>
    <title>Bob's Auto Parts - Feedback Submitted</title>
</head>
<body>
<h1>Feedback submitted</h1>
<p>Your feedback has been sent.</p>
</body>
</html>